package com.cy.pojo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@NoArgsConstructor
@AllArgsConstructor
@Data
@Api("返回参数格式")
public class JsonResult implements Serializable {

    @ApiModelProperty("返回值参数")
    private Integer state =200;
    @ApiModelProperty("返回值状态")
    private String message = "ok";
    @ApiModelProperty("返回值信息")
    private Object data;


    public JsonResult(String message) {
        this.message = message;
    }

    public JsonResult(Object data) {
        this.data = data;
    }

    public JsonResult(Object data,String message) {
        this.data = data;
        this.message = message;
    }
    public JsonResult(Integer state, String message) {
        this.state = state;
        this.message = message;
    }
}
